from selenium.webdriver.common.by import By

from base.base import Base
class Page(Base):

    ifame_loc=(By.XPATH,'/html/body/div[3]/div[3]/div[1]/div/div[3]/div[1]/div[2]/iframe')
    def ifame(self):
        self.window_iframe(self.ifame_loc)

    username_loc=(By.XPATH,'/html/body/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/input')
    def username(self):
        self.send_keys(self.username_loc,'17631289665')

    password_loc=(By.XPATH,'/html/body/div[2]/div[2]/div[2]/form/div/div[3]/div[2]/input[2]')
    def password(self):
        self.send_keys(self.password_loc,'Weimx1026')

    login_loc=(By.XPATH,'/html/body/div[2]/div[2]/div[2]/form/div/div[8]/a')
    def login(self):
        self.click(self.login_loc)

    #写信
    xiexin_loc=(By.XPATH,'/html/body/div[1]/nav/div[1]/ul/li[2]/span[2]')
    def xiexin(self):
        self.click(self.xiexin_loc)
    #输入收件人
    shoujianren_loc=(By.ID,'_mail_emailcontainer_0_359')
    def shoujianren(self):
        self.send_keys(self.shoujianren_loc,'2904498982@qq.com')
    #输入主题
    zhuti_loc=(By.ID,'1754968709546_subjectInput')
    def zhuti(self):
        self.send_keys(self.zhuti_loc,'月考题')
    #输入内容
    neitong_loc=(By.XPATH,'/html/body/div')
    def neirong(self):
        self.send_keys(self.neitong_loc,'啊啊啊啊啊')
    #点击发送
    send_loc=(By.XPATH,'/html/body/div[2]/div[1]/div[2]/div[1]/section/footer/div[1]/span[2]')
    def send(self):
        self.click(self.send_loc)


























        


